<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>已知⼀个数组序列，全部为正整数，找出其中任意两个数相差最⼤的组合</title>
</head>

<body>
  <script>
    var i = [1, 2, 5, 9, 11, 20, 3, 99]
    var arr = Math.max(...i)
    var ar1 = Math.min(...i)
    console.log('最大值：' + arr);
    console.log('最小值：' + ar1);
  </script>
</body>

</html>